<!DOCTYPE html>
<html class="index_body">
<head lang="en">
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=10">
    <meta http-equiv="Expires" content="0">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Cache-control" content="no-cache">
    <meta http-equiv="Cache" content="no-cache">
    <title>优优车 - 渠道明细</title>
    <link rel="stylesheet" href="/Public/mui/computer/css/bootstrap.css"/>
    <link rel="stylesheet" href="/Public/mui/computer/css/index.css"/>
    <link rel="stylesheet" href="/Public/mui/css/page.css"/>
    <link rel="stylesheet"  href="/Public/mui/static/bower_components/sweetalert/dist/sweetalert.css">
    <link rel="stylesheet" type="text/css" href="/Public/mui/modalframe/css/default.css" />
    <link rel="stylesheet" type="text/css" href="/Public/mui/modalframe/css/component.css" />
</head>
<body class="index_body">
<include file="Lay:heder" />
<div class="container" style="width: 100%;">
   <!--  <div class="md-modal md-effect-1" id="modal-1">
        <div class="md-content">
            <div class="images_content" style="width: 600px;height:600px;">
            <h3>图片展示</h3><button class="md-close" style="width: 100%;">取消</button>
                <img id="imgmodeltanchu" src="" alt="" style="width:100%;height:100%;margin:0 auto;">
            </div>
        </div>
    </div> -->
    <div id="section" style="padding-top:20px;">
        <table class="table table-hover table-bordered table_tong">
            <thead>
            <tr>
                <th>审核明细</th>
                <th>渠道编号</th>
                <th>渠道姓名</th>
                <th>提交时间</th>
                <th>所属省市</th>
                <th>顾问姓名</th>
                <th>顾问岗位号</th>
                <th>城市经理审核时间</th>
                <th>渠道状态</th>
                <th>大数据审核</th>
            </tr>
            </thead>
            <tbody>
            <tr>
                <td></td>
                <td>{{$channel_data['waynum']}}</td>
                <td>{{$channel_data['name']}}</td>
                <td>{{$channel_data['create_time']}}</td>
                <td>{{$channel_data['adminprovince']}} / {{$channel_data['admincity']}}</td>
                <td>{{$channel_data['admin_name']}}</td>
                <td>{{$channel_data['admin_id']}}</td>
                <td>{{$channel_data['citymanager_time']}}</td>
                <td>{{$channel_data['status']}}</td>
                <!-- <td><a href="/admin/Credit/creditlistdetails?uid={{$channel_data['id']}}&waynumid=1">进行大数据审核</a></td> -->
            </tr>
            </tbody>
        </table>
        <table class="table table-hover table-bordered table_tong">
            <thead>
            <tr>
                <th>审核明细</th>
                <!-- <th>渠道类型</th>
                <th>职业</th>
                <th>年龄</th> -->
                <th>地址</th>
                <th>联系方式</th> 
                <!-- <th id="bordered">身份证号码(照片)<if condition="$channel_data['verificationID'] EQ 0">
                                        <<a href="javascript:Testing()" class="jiance">点击检测身份信息</a>>
                                        <elseif condition="$channel_data['verificationID'] eq 1"/>
                                            <已通过验证>
                                        <elseif condition="$channel_data['verificationID'] eq 2"/>
                                        <未通过验证 | <a href="javascript:TestingRemarks()">查看原因</a>>
                                     </if> 
                </th> -->
                <!-- <th>营业执照(照片)</th>
                <th>授权证明(照片)</th>
                <th>其他资料(照片)</th>
                <th>打款银行名称</th>
                <th>银行账户名</th>
                <th>银行卡号</th>
                <th>身份证号</th> -->
            </tr>
            </thead>
            <tbody>
            <tr>

                <td></td>
                <!-- <td>{{$channel_data['channeltype']}}</td> -->
                <!-- <td>{{$channel_data['occupation']}}</td> -->
                <!-- <td>{{$channel_data['age']}}</td> -->
                <td>{{$channel_data['company']}}</td>
                <td>{{$channel_data['tel']}}</td>
                <!-- <td>
                     <if condition="$channel_data['addtype_url']  NEQ 1">
                           <a class="md-trigger" data-modal="modal-1" onclick="ejectmodel('{{$channel_data['ossurl']}}{{$channel_data['groupphoto_url'][0]}}')">点击查看渠道证人照片</a>
                    <else/>
                            <a class="md-trigger" data-modal="modal-1" onclick="ejectmodel('{{$channel_data['ossurl']}}/Public/Uploads/identify/{{$channel_data['identify_url'][0]}}')">点击查看身份证正面</a><br />
                           <a class="md-trigger" data-modal="modal-1" onclick="ejectmodel('{{$channel_data['ossurl']}}/Public/Uploads/identify/{{$channel_data['identify_url'][1]}}')">点击查看身份证反面</a><br />
                           <a class="md-trigger" data-modal="modal-1" onclick="ejectmodel('{{$channel_data['ossurl']}}/Public/Uploads/identify/{{$channel_data['identify_url'][2]}}')">点击查看渠道证人照片</a>
                    </if>
                </td> -->
                <!-- <td>
                    <if condition="$camptradeurl NEQ 0">
                            <for start="0" end="$camptradeurl">
                                <a href="{{$channel_data['camptrade_url'][$i]}}" target="_blank">图 {{$i+1}}</a>
                                <a class="md-trigger" data-modal="modal-1" onclick="ejectmodel('{{$channel_data['ossurl']}}{{$channel_data['camptrade_url'][$i]}}')">图 {{$i+1}}</a>
                            </for>
                            <a href="{{$channel_data['camptrade_url'][0]}}" target="_blank">点击查看营业执照</a>
                    <elseif condition="$camptradeurl eq 0"/>无照片
                            
                    </if>
                </td> -->
                <!-- <td>

                    <if condition="$identifyurl NEQ 0">
                         <for start="0" end="$identifyurl">
                            <a href="{{$channel_data['identifyprove_url'][$i]}}" target="_blank">图 {{$i+1}}</a>
                            <a class="md-trigger" data-modal="modal-1" onclick="ejectmodel('{{$channel_data['ossurl']}}{{$channel_data['identifyprove_url'][$i]}}')">图 {{$i+1}}</a>
                        </for>
                        
                        <elseif condition="$identifyurl eq 0"/>
                        无照片
                    </if>
                </td> -->

                <!-- <td>
                    <if condition="$arrotherurl NEQ 0">
                        <for start="0" end="$arrotherurl">
                            <a href="{{$channel_data['otherdata_url'][$i]}}" target="_blank">图 {{$i+1}}</a>
                            <a class="md-trigger" data-modal="modal-1" onclick="ejectmodel('{{$channel_data['ossurl']}}{{$channel_data['otherdata_url'][$i]}}')">图 {{$i+1}}</a>
                        </for>
                        <elseif condition="$arrotherurl eq 0"/>无照片
                    </if>
                </td> -->
                <!-- <td>{{$channel_data['bank']}}</td>
                <td>{{$channel_data['banker']}}</td>
                <td>{{$channel_data['banknum']}}</td>
                <td>{{$channel_data['identify']}}</td> -->
            </tr>
            </tbody>
        </table>
        <div style="display: none" id="Remarks">{{$channel_data['distinguishRemarks']}}</div>
        <div class="jiazai" style="width:100%;height:100%;position: fixed;top: 0;left: 0;background: rgba(0,0,0,.6);z-index: 999;display: none;">
            <img src="/Public/mui/images/jiazai.gif" alt="" style="width: 60px;height: 60px;position: absolute;top: 43%;left: 43%">
        </div>
        <input type="hidden" name="remark" value="">
        <if condition="$_GET['isyy'] neq true">
        <div class="btnK">
            <button type="button" channelid="{{$channel_data['id']}}" class="btn btn-success navbar-btn">通过</button>
           <!--  <button type="button" class="btn btn-orange navbar-btn" onclick="isGetOrder(-2);" style="background-color: orange;color:#fff">驳回渠道</button> -->
            <button type="button" channelid="{{$channel_data['id']}}" class="btn btn-danger navbar-btn">拒绝</button>
        </div>
        </if>
    </div>
</div>
<div class="mask-layer" style="display: none">
    <div class="mask-layer-black"></div>
    <div class="mask-layer-container">
        <div class="mask-layer-container-operate">
            <!-- <button class="mask-prev btn-default-styles" style="float: left">上一张</button> -->
            <button class="mask-out btn-default-styles">放大</button>
            <button class="mask-in btn-default-styles">缩小</button>
            <button class="mask-clockwise btn-default-styles">顺旋转</button>
            <button class="mask-counterclockwise btn-default-styles">逆旋转</button>
            <button class="mask-close btn-default-styles">关闭</button>
            <!-- <button class="mask-next btn-default-styles" style="float: right">下一张</button> -->
        </div>
        <div class="mask-layer-imgbox auto-img-center">
            <p>
                <img id="imgmodeltanchu" src="" alt="" style="width: 620px; margin-top: 43.5px;height: 100%">
            </p >
        </div>
    </div>
</div>
<include file="News:news" />
<script type="text/javascript" src="/Public/mui/static/js/jquery-3.2.0.min.js"></script>
<script type="text/javascript" src="/Public/mui/static/bower_components/sweetalert/dist/sweetalert.min.js"></script>
<!-- <script type="text/javascript" src="/Public/mui/computer/js/functions.js"></script> -->
<!-- <script type="text/javascript" src="/Public/mui/computer/js/channel.js"></script> -->
<!-- <script src="/Public/mui/computer/js/enlarge.js"></script> -->
<!-- <script src="/Public/mui/computer/js/back.js"></script> -->
<!-- <script src="/Public/mui/modalframe/js/classie.js"></script>
<script src="/Public/mui/modalframe/js/modalEffects.js"></script> -->
<script>
    var time = Math.random();
    document.write("<s"+"cript type='text/javascript' src='/Public/mui/computer/js/functions.js?v="+time+"'></scr"+"ipt>");
    document.write("<s"+"cript type='text/javascript' src='/Public/mui/computer/js/channel.js?v="+time+"'></scr"+"ipt>");
    document.write("<s"+"cript type='text/javascript' src='/Public/mui/computer/js/enlarge.js?v="+time+"'></scr"+"ipt>");
    document.write("<s"+"cript type='text/javascript' src='/Public/mui/computer/js/back.js?v="+time+"'></scr"+"ipt>");

    var isset = "{{$channel_data['addtype_url']}}";
    if (isset != '1') {
        $("#bordered").html("渠道/销售合照");
    }
    var Remark = $("#Remarks").text();
    function isGetOrder(status){
    swal({title: "确定驳回渠道吗？",text: "驳回后将立即生效并跳转到列表页面。", type: "warning",showCancelButton: true, confirmButtonColor: "#DD6B55",confirmButtonText: "是的",cancelButtonText: "取消", closeOnConfirm: false},
      function(){
        var orderid = "{{$channel_data['id']}}";

        if(orderid == ""){
            sweetAlert('','对不起,操作有误,请重新刷新页面','error');return false;
        }

        var remark = $('input[name="remark"]').val();
        if(status==-2&&remark==''){
            swal({ 
              title: "备注", 
              text: "为什么驳回？",
              type: "input", 
              confirmButtonText: "好了",
              cancelButtonText: "取消",
              showCancelButton: true, 
              closeOnConfirm: false, 
              animation: "slide-from-top", 
              inputPlaceholder: "请简单说明为什么驳回。"
            },
            function(inputValue){ 
              if(inputValue!=""&&inputValue){
                $('input[name="remark"]').val(inputValue);
                data = {'id':orderid,'status':status,'remark':inputValue}
                sendStatus(data);
              }else{
                sweetAlert('','抱歉！备注是必填项。','error');
              }
            });
            return false;
        }else{
            data = {'id':orderid,'status':status};
            sendStatus(data);
        }
      });
    }
    function sendStatus(data) {
        post("ChannelReject",data,function(res){
                if(res['ret'] == 1){
                    sweetAlert('','操作成功','success');
                    setTimeout(function () {
                      location.href = '/admin/channel/channellistindex';
                    },3000);
                }else if(res == 2){
                    sweetAlert('','订单已做修改,请刷新重新获取资料','error');
                    return false;
                }else{
                    window.location.href="/admin/channel/channellistindex";
                }
            });
    }
    function Testing(){
        $(".jiazai").css("display","block");
        var identify0  = "{{$channel_data['identify_url'][0]}}";
        var identify1  = "{{$channel_data['identify_url'][1]}}";
        var identify2  = "{{$channel_data['identify_url'][2]}}";

        var id  = "{{$channel_data['id']}}";
        data =  {'identity_A':identify0,'people_H':identify2,'identity_B':identify1,'id':id};
        $.ajax({
            'url':'ConfirmIdentityEdit',
            'type':'post',
            'data':data,
            'dataType':'json',
            'success':function(response) {
              // $('.jiance').css("disabled","disabled");
              // $('.jiance').css("disabled","disabled");
              $('.jiance').removeAttr('href');
              $('.jiazai').css('display','none');
              if(response['success']=='OK'){
                sweetAlert('',response.message,'success');
              }else if(response['error']>0){
                sweetAlert('',response.message,'error');
              }else{
                sweetAlert('','系统错误，请联系管理员处理！','error');
              }
            },
            xhrFields: {
               withCredentials: true
            }
          });
    }
    function TestingRemarks(){
       sweetAlert('',Remark,'error');
    }

    function ejectmodel(id){
        document.getElementById("imgmodeltanchu").src=id;
        // document.getElementById("imgmodeltanchu").src='http://jindouche.oss-cn-beijing.aliyuncs.com'+id;
        $('.mask-layer').show();
    }
    var adminshowznum1 = 0;
    $("body").delegate(".images_content>img","click",function(){
            adminshowznum1 ++;
            this.style.transform = 'rotate('+90*adminshowznum1+'deg)';
        });
</script>
</body>
</html>